﻿@model PMKB_DAL.I_Link_OLAP
@{
    var tags = PMKB_Repository.clsLoadLinks.tags(Model);
    var trid = string.Format("I_Link_OLAP_{0}", Model.LinkID);
    var linkurl = Model.LinkUrl ?? "";
    var linkname = Model.LinkName ?? "";
    var linkid = "lnk" + Model.LinkID.ToString();
}
<tr id="@trid">
    <td>
        @ViewData["nr"]
    </td>
    <td>
        @Html.DisplayFor(model => model.LinkName)
    </td>
    <td>
        @Html.Raw(Model.LinkDescription)
    </td>
    <td>
        <a href="@Model.LinkUrl" target="_blank" >@Html.DisplayFor(model => model.LinkUrl)</a>
        
        <br /><br /><br />
         <a href="javascript:copyClipboard('@linkurl.Replace("\\", "\\\\").Replace("'", "\\'")','@linkid')" id='@linkid'>Clipboard</a>
   
    </td>
    <td>
        @if (tags != null && tags.Length > 0)
        { 
            
            <text><div id="menu-outerH">
                <div class="tableH">
                    <ul id="horizontal-list">
                        @foreach (var item in tags)
                        {
                            <li><a href="@Url.Action(MVC.Tag.Index(item,1,10))">@item</a></li>  
                        }
                    </ul>
                </div>
            </div>
            </text>
        
        }
        
    </td>
    <td>
        from <i>@Html.DisplayFor(model => model.UserName)</i> at
        @Html.DisplayFor(model => model.LinkCreationDate, new T4MVC.SharedController.ViewNames._DisplayTemplates().DateNoTime)
    </td>
    <td>  
         <a href='@linkurl.Replace("\\", "/").Replace("'", "\\'")' target="_blank">Open</a>
         <br />
        @Html.ActionLink("Edit", MVC.Link.Edit(Model.LinkID))
      
        <br />
        <br />
        <a href="javascript:Delete('@Url.Action(MVC.Link.Delete())',@Model.LinkID, '@linkname=@Model.LinkName??""; @linkname.Replace("\\", "\\\\").Replace("'", "\\'")',function(){$('#'+ '@trid').hide();})">
        @PMKB_DAL.PMKBEntities_resource.User_Delete_Param("")
        </a>
        
      
    </td>
</tr>

